// 自动生成模板UserOrder
package model

import (
	"gin-vue-admin/global"
)

// 如果含有time.Time 请自行import time包
type UserOrder struct {
      global.GVA_MODEL
      BuType  string `json:"buType" form:"buType" gorm:"column:bu_type;comment:报价形式;type:varchar(255);"`
      BuyContaxt  string `json:"buyContaxt" form:"buyContaxt" gorm:"column:buy_contaxt;comment:采购企业联系人;type:varchar(255);"`
      BuyContract  string `json:"buyContract" form:"buyContract" gorm:"column:buy_contract;comment:采购方合同图片;type:varchar(255);"`
      BuyId  int `json:"buyId" form:"buyId" gorm:"column:buy_id;comment:买家;type:int;size:10;"`
      BuyPhone  string `json:"buyPhone" form:"buyPhone" gorm:"column:buy_phone;comment:采购企业手机号;type:varchar(255);"`
      Desc  string `json:"desc" form:"desc" gorm:"column:desc;comment:采购说明;type:text;"`
      DescPic  string `json:"descPic" form:"descPic" gorm:"column:desc_pic;comment:采购说明图片;type:varchar(255);"`
      GetAddress  string `json:"getAddress" form:"getAddress" gorm:"column:get_address;comment:收获地区;type:varchar(255);"`
      GetDate  string `json:"getDate" form:"getDate" gorm:"column:get_date;comment:收货日期;type:varchar(255);"`
      IsPublic  *bool `json:"isPublic" form:"isPublic" gorm:"column:is_public;comment:是否发布到求购大厅;type:tinyint"`
      Name  string `json:"name" form:"name" gorm:"column:name;comment:采购清单名称;type:varchar(255);"`
      OrderSn  string `json:"orderSn" form:"orderSn" gorm:"column:order_sn;comment:平台订单号;type:varchar(255);"`
      PayType  string `json:"payType" form:"payType" gorm:"column:pay_type;comment:交易方式;type:varchar(255);"`
      ProjectId  int `json:"projectId" form:"projectId" gorm:"column:project_id;comment:项目ID;type:int(10);"`
      SellContaxt  string `json:"sellContaxt" form:"sellContaxt" gorm:"column:sell_contaxt;comment:供应企业联系人;type:varchar(255);"`
      SellContract  string `json:"sellContract" form:"sellContract" gorm:"column:sell_contract;comment:供应企业图片;type:varchar(255);"`
      SellDesc  string `json:"sellDesc" form:"sellDesc" gorm:"column:sell_desc;comment:供应企业备注;type:text;"`
      SellPhone  string `json:"sellPhone" form:"sellPhone" gorm:"column:sell_phone;comment:供应企业手机号;type:varchar(255);"`
      SellerId  int `json:"sellerId" form:"sellerId" gorm:"column:seller_id;comment:卖家;type:int;size:10;"`
      Status  int `json:"status" form:"status" gorm:"column:status;comment:1待审核。2驳回。3待报价，双方上传合同。4待合同审核。5待平台上传付款凭证。6待双方上传收发货凭证。7待平台收发货凭证审核。8完整订单;type:int;size:10;"`
      UserSn  string `json:"userSn" form:"userSn" gorm:"column:user_sn;comment:自有采购单编号;type:varchar(255);"`
      Project UserProject `json:"project" gorm:"foreignKey:ID;references:ProjectId"`
      BuyUsers Users `json:"buy_user" gorm:"foreignKey:ID;references:BuyId"`
      SellerUser Users `json:"seller_user"  gorm:"foreignKey:ID;references:SellerId"`
      UserOrderDetail []UserOrderDetail `json:"user_order_detail"  gorm:"foreignKey:OrderId;references:ID"`
      UserOrderGetPic []UserOrderGetPic `json:"user_order_get_pic" gorm:"foreignKey:OrderId;references:ID"`
      UserOrderSendPic [] UserOrderSendPic `json:"user_order_send_pic" gorm:"foreignKey:OrderId;references:ID"`
      UserOrderPay []UserOrderPay  `json:"user_order_pay" gorm:"foreignKey:OrderId;references:ID"`
}


func (UserOrder) TableName() string {
  return "user_order"
}

